#ifndef ARSXMLADAPTER_H
#define ARSXMLADAPTER_H

#include <QtPlugin>
#include <QIODevice>
#include <QDomDocument>

#include <adapterinterface.h>
#include <staticmodel.h>

class StaticModelFileAdapter : public QObject,
                               public StaticModelFileAdapterPluginInterface
{
    Q_OBJECT
    Q_INTERFACES(PluginInterface StaticModelFileAdapterPluginInterface)

public:
    StaticModelFileAdapter(QObject * parent = 0);

    QString name() const;
    QString description() const;
    bool loadSettings();
    ServerModel * createModel(QIODevice * device);
    bool saveModel(ServerModel * model, QIODevice * dest);

private:
    ARSWorkflowObject * parseObject(ServerModel * model, const QDomElement & element);
    static QString value2string(const QVariant & value);
};

#endif // ARSXMLADAPTER_H
